#include <stdio.h>
#include <stdlib.h>

// size of image
#define WIDTH  256
#define HEIGHT 256

typedef struct {
    unsigned char r;
    unsigned char g;
    unsigned char b;
} RGB;

void rgb2gray(RGB color_img[HEIGHT][WIDTH], unsigned char gray_img[HEIGHT][WIDTH]);
